<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>管理员主页面</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link rel="stylesheet" type="text/css" href="css/student.css">

</head>
<!-- 管理员主页面 -->
<body>
	<jsp:include page="head.jsp"></jsp:include>
	<div>
		<div id="left">
			<ul>

				<li>
					<h2>
						<a href="<%=basePath%>addStudent.jsp">添加学生</a>
					</h2>
				</li>
				<li>
					<h2>
						<a href="<%=basePath%>deleteStudent.jsp">删除学生</a>
					</h2>
				</li>
				<li>
					<h2>
						<a href="<%=basePath%>showstudent.jsp">查看学生</a>
					</h2>
				</li>

			</ul>
		</div>
		<div id="main">
			<h4>当前位置 ****** 查询学生信息</h4>
			<!-- 管理员根据年级，专业，班级查询学生信息-->
			<form action="showStudent.action" method="post"> 
				
				 <font color="#1a1afa">年级</font> <select name="grade">
					<option value="any">-不限-</option>
					<option value="11">11级</option>
					<option value="12">12级</option>
				</select>&nbsp;&nbsp;
				 <font color="#1a1afa">专业</font> 
				 <select name="major">
                    <option value="信息管理与信息系统">信息管理与信息系统</option>
					<option value="软件工程">软件工程</option>
				</select>&nbsp;&nbsp; 
				<font color="#1a1afa">所在班级</font> <select name="theclass">
					<option value="any">-不限-</option>
					<option value="1">1</option>
					<option value="2">2</option>
				</select>&nbsp;&nbsp; 
			 </br> </br> <input type="submit" value="查  询 " class="button" /> &nbsp;&nbsp; </form>

			<s:if test="#request['s']!=null">
				<!-- 如果查询成功信息用table在如下显示 -->
					<table border="1" class="gridtable">
						<tr>
							<td>学号</td>
							<td>姓名</td>
							<td>性别</td>
							<td>年级</td>
							<td>学院</td>
							<td>专业</td>
							<td>班级</td>
							<td>电子邮箱</td>
							<td>联系方式</td>

						</tr>

						<s:iterator value="#request['s']" id="student" status="stat">

							<tr>

								<td><s:property value="#student.id" />
								</td>
							    <td><s:property value="#student.name" />
								</td>
								<td><s:property value="#student.sex" />
								</td>
								<td><s:property value="#student.grade" />
								</td>
								<td><s:property value="#student.academy" />
								</td>
								<td><s:property value="#student.major" />
								</td>
								<td><s:property value="#student.theclass" />
								</td>
								<td><s:property value="#student.email" />
								</td>
								<td><s:property value="#student.phone" />
								</td>
							</tr>
						</s:iterator>
					</table>
					</br>
					
			</s:if>
			<s:property value="#request.meg" />
		</div>
	</div>
	<hr width=100% size=5 color=#2323fe style="FILTER: alpha(opacity=100,finishopacity=0,style=3)">
</body>
</html>
